#include <utility>

namespace SNU
{
	class CCornerInfo
	{
	public:
		CCornerInfo();
		~CCornerInfo();

		int GetWidth() const { return m_nWidth; }
		int GetHeight() const { return m_nHeight; }
		//int GetX() const { return zeroX; }
		//int GetY() const { return zeroY; }
		//int GetnX() const { return newX; }
		//int GetnY() const { return newY; }
		//float GetCos() const { return cos; }
		//float GetSin() const { return sin; }
		void SetWidth(int nWidth) {m_nWidth = nWidth;}
		void SetHeight(int nHeight) {m_nHeight = nHeight;}
		void SetX(int x) {zeroX = x;}
		void SetY(int y) {zeroY = y;}
		void SetnX(int x) {newX = x;}
		void SetnY(int y) {newY = y;}
		void SetCos(int ncos) {cos = ncos;}
		void SetSin(int nsin) {sin = nsin;}
		int GetConverted(const std::pair<int,int>& pairInput, int nImageNum);

	private:
		int m_nWidth;
		int m_nHeight;
		int zeroX;
		int zeroY;
		int newX;
		int newY;
		int cos;
		int sin;
	};
};

// input_image_arrays : 
// output_image_arrays : should be allocated before
// output_width : width of normalized image ( should be allocated before )
// output_height : height of normalized image ( should be allocated before )
bool SNU_detect_corner(char** input_image_arrays, char** output_image_arrays, int* output_width, int* output_height);

// input_image_arrays : 
// return value : if detection failed, return value should be NULL
CCornerInfo* SNU_detect_corner_norotate(char** input_image_arrays);

// input_image_arrays : 
// output_imagenum : image number want to be shown ( 0-8 )
// output_cornerx : x cordinates [4] ( should be allocated before )
// output_cornery : y cordinates [4] ( should be allocated before )
bool SNU_detect_corner_visible(char** input_image_arrays, int* output_imagenum, int* output_cornerx, int* output_cornery);
